package com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestcntr;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 舱单箱信息 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author chenzheng
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ManifestCntrEdiBaseVO {

    @Schema(description = "箱号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifestcntr.cntrno.notblank}")
    @Length(max = 12, message = "{manifestcntr.cntrno.length}")
    private String cntrNo;

    @Schema(description = "铅封号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifestcntr.sealno.notblank}")
    @Length(max = 100, message = "{manifestcntr.sealno.length}")
    private String sealNo;

    @Schema(description = "箱型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotBlank(message = "{manifestcntr.cntrtype.notblank}")
    @Length(max = 2, message = "{manifestcntr.cntrtype.length}")
    private String cntrType;

    @Schema(description = "尺寸", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifestcntr.cntrsize.notblank}")
    @Length(max = 2, message = "{manifestcntr.cntrsize.length}")
    private String cntrSize;

    @Schema(description = "箱主代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifestcntr.cntrowner.notblank}")
    @Length(max = 5, message = "{manifestcntr.cntrowner.length}")
    private String cntrOwner;

}
